<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateRbacRolesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('rbac_roles', function (Blueprint $table) {
            $table->increments('id')->comment('表备注：角色信息表');
            $table->string('name')->comment('是否删除,1:是,0:否');
            $table->text('power')->nullable()->comment('json数组');
            $table->tinyInteger('status')->default(1)->comment('状态，0：禁用 1：启用');
            $table->string('desc')->default(1)->comment('角色描述');
            
            $table->dateTime('created_at')->nullable()->default(null);
            $table->dateTime('updated_at')->nullable()->default(null);
            $table->tinyInteger('deleted')->default(0)->comment('是否删除,1:是,0:否');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('rbac_roles');
    }
}
